home comics writing pictures archive about

Line.cpp

Language: C++
Last Modified: 2021-10-23 9:51:06 PM UTC
File Size: 1328 bytes
http://www.penguinstew.ca/example/CodeFormater/Line.cpp
includeLineh
include<sstream>
Line::Lineintnumberstd::stringcontent
{
this>number=number;
this>content=content;
}
intLine::GetNumber
{
returnthis>number;
}
std::stringLine::GetContent
{
returnthis>content;
}
std::stringLine::ToString
{
std::stringstreamstream;
stream<<lineNumber:;
stream<<number:<<this>number<<;
stream<<content:<<this>content<<;
returnstreamstr;
}
std::stringLine::FormatNumberboolfirst
{
std::stringstreamstream;
stream<<\t\t<divclass=\;
iffirst
{
stream<<codeCountRowFirst;
}
else
{
stream<<codeCountRow;
}
stream<<\><<std::endl;
stream<<\t\t\t<divclass=\codeCountCell2\>;
stream<<this>number;
stream<<<div><<std::endl;
stream<<\t\t<div><<std::endl;
returnstreamstr;
}
std::stringLine::FormatContentboolfirst
{
std::stringstreamstream;
stream<<\t\t<divclass=\;
iffirst
{
stream<<codeTextRowFirst;
}
else
{
stream<<codeTextRow;
}
stream<<\><<std::endl;
stream<<\t\t\t<divclass=\codeTextCell2\>;
stream<<this>content;
stream<<<div><<std::endl;
stream<<\t\t<div><<std::endl;
returnstreamstr;
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73